package com.zat.mes.andrmes.dofun.system

import android.view.View
import android.webkit.WebView
import android.webkit.WebViewClient
import com.love.zywanandroid.retrofit.api.HttpUrl
import com.zat.mes.andrmes.R
import com.zat.mes.andrmes.base.BaseActivity
import kotlinx.android.synthetic.main.activity_about.*
import kotlinx.android.synthetic.main.layout_title.*

/**
 * 关于我们
 */
class AboutActivity : BaseActivity() {

    override fun init() {
        initView()
        initData()

    }

    private fun initData() {
//        webAbout.settings.javaScriptEnabled = true
        webAbout.settings.useWideViewPort = true
        webAbout.settings.loadWithOverviewMode = true
        webAbout.settings.setSupportZoom(true)
        webAbout.loadUrl(HttpUrl.URL_ABOUT)
        webAbout.webViewClient = object : WebViewClient() {
            override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
                view?.loadUrl(url)
                return true
            }
        }

    }

    private fun initView() {
        setContentView(R.layout.activity_about)
        tVtitle.text = getString(R.string.about)
        rlReturnTitle.visibility = View.VISIBLE
        rlReturnTitle.setOnClickListener { finish() }
    }


}
